<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>消息</title>
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <style>
    body{
      width:100%;
      height:auto;
      overflow: hidden;
      background: #fff;
    }
        .box {
            height: 7px;
            background: #c3c3c3;
            margin-top: 11px;
        }

        .in-one {
            height: 73px;
            padding: 5px 25px;
            color: #727272;
            font-size: 17px;
            word-break:break-all;
            word-wrap:break-word
        }

        .imghome {
            width: 100%;
            height: 231px;
        }

        .in-two {
            margin-top: 25px;
            color: #727272;
            padding: 0px 25px;
            line-height: 15px;
            font-size: 13px;
            word-break:break-all;
            word-wrap:break-word;

        }
        .in-two img{
          width: 100%;
          height: auto;
        }

        ul {
            margin: 23px 0px 0px 27px;
            color: #727272;
            font-size: 13px;
            list-style: none;
        }

        .time {
            text-align: right;
            margin: 56px 26px 0px 0px;
            font-size: 13px;
            color: #727272;
        }
        .outcat {
            /*width: 131px;*/
            height: 103px;
        }
        .cat {
            text-align: center;
            margin-top: 144px;
        }
        .zi {
            margin-top: 18px;
            color: #ededed;
        }

    </style>
</head>

<body>
    <div id="vm">

        <div class="box">
        </div>
<!--
        <div class="cat" v-if='iskong'>
          <img src="../../image/few/incat.png" alt="" class="outcat">
          <div class="zi">
              暂无任何消息
          </div>
        </div> -->
        <div>
          <div class="in-one">
              {{messagelist.title}}
          </div>
          <div class="in-two" v-html="messagelist.msg">
          </div>
          <div class="time">
              日期 {{messagelist.sendtime}}
          </div>
        </div>

    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/config.js"></script>
<script type="text/javascript" src="../../script/rest.js"></script>
<script type="text/javascript" src="../../script/vue.2.5.js"></script>
<script type="text/javascript" src="../../script/zepto.js"></script>
<script type="text/javascript" src="../../script/faskclick.js"></script>
<script type="text/javascript">
    var uid = $api.getStorage('uid');
    var vm = new Vue({
        el: '#vm',
        data: {
            messagelist: [],
            iskong:true
        },
        created: function() {
            var _this = this;
            apiready = function() {
                _this.init();
                api.parseTapmode();
                if ('addEventListener' in document) {
                    document.addEventListener('DOMContentLoaded', function() {
                        FastClick.attach(document.body);
                    }, false);
                }
            }
        },
        methods: {
            init: function() {
                var _this = this;
                new rest().post('getMessageDetail').datae({
                    'uid': uid,
                    'message_id': api.pageParam.messageid
                }).success(function(res) {
                    if (res.flag == 1) {
                        _this.messagelist = res.msg[0];
                        if(res.msg.length==0){
                          _this.iskong=true;
                        }else{
                          _this.iskong=false;
                        }
                        // console.log(JSON.stringify(_this.messagelist))
                    } else {
                        api.toast({
                            msg: res.msg[0],
                            duration: 2000,
                            location: 'middle'
                        });
                    }
                }).error(function(err) {
                    console.log(JSON.stringify(err))
                }).run()
            }
        }
    })
</script>

</html>
